home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93c.txt
/
000114_icon-group-sender _Tue Dec 14 17:42:10 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1994-02-02
|
1KB
Received: by cheltenham.cs.arizona.edu; Tue, 14 Dec 1993 17:39:55 MST
Date: Tue, 14 Dec 93 17:42:10 CST
From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery)
Message-Id: <9312142342.AA18337@ringer.cs.utsa.edu.sunset>
To: rpereda@arizona.edu
Cc: icon-group@cs.arizona.edu
In-Reply-To: (Ray Erasmo Pereda's message of 3 Dec 93 10:23:49 GMT <2dn43l$9ms@optima.cs.arizona.edu>
Subject: two language questions
Content-Length: 681
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
gmt@CS.Arizona.EDU (Gregg Townsend) writes:
|> It is safe to insert and delete items of a set while the set
|> is being generated. Items that are neither inserted nor deleted are
|> generated exactly once.
To which Ray Pereda asks:
Does the same hold for lists and tables?
No and yes. Tables share the implementation of sets and exhibit
similar behavior. Watch what happens when you delete already-generated
elements from a list during the middle of generation:
procedure main()
L := [1, 2, 3, 4]
every e := !L do { pop(L); pop(L); write(e) }
end
writes:
1
4
My, how interesting! It gets wilder when you delete lots of elements
from larger lists.